﻿/// <reference path="utils.js" />
'use strict';

var items = [
    'common/models/customer.model',
    'common/models/customer.coll',
    'common/models/bill.model',
    'common/models/bill.coll',
    'common/models/billingHistory.model',
    'common/models/billingHistory.coll',
    'common/models/billingItem.model',
    'common/models/billingItem.coll',
    'common/models/product.model',
    'common/models/product.coll',
];

define(items, function () {
    var obj = {};

    for (var i = 0, len = items.length; i < len; i++)
    {
        var path = items[i],
            fileName,
            itemName,
            isModel;

        fileName = path.replace('common/models/', '');

        isModel = (fileName.match('model')) ? true : false;

        itemName = (isModel) ? fileName.replace('.model', 'Model') : fileName.replace('.coll', 'Coll');

        //Capitalize
        itemName = itemName.charAt(0).toUpperCase() + itemName.slice(1);

        obj[itemName] = arguments[i];
    }

    return obj;
});